package com.example.doctorserver.mapper;

import com.example.doctorserver.dto.OrdersResponseDTO;
import com.example.doctorserver.dto.SelectForm;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;


@Mapper
public interface OrdersMapper {

    Page<OrdersResponseDTO> selectOrderByForm(SelectForm selectForm);

    @Select("SELECT smId FROM orders WHERE orderId = #{orderId}")
    int getsmId(Integer orderId);

    @Update("update orders set state=#{state} where orderId=#{orderId}")
    int updateState(Integer orderId, Integer state);
}